package com.likeycy.my;

/**
 * @ClassName: SortThread
 * @Description: 史上“最强”休眠排序算法：采用该种排序算法有可能会被老板开除，慎用
 * @Author: sodagreen
 * @Date: 2021/4/4 3:52
 * @Version: 1.0
 */
public class SortThread extends Thread{

    private int value;

    public SortThread(int value) {
        this.value = value;
    }

    @Override
    public void run() {
        try {
            Thread.sleep(value);
            System.out.println(value);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        int[] array = {2, 9, 100, 250, 10, 60};
        for (int i : array) {
            new SortThread(i).start();
        }
    }
}
